//
//  JSHttpRequest.h
//  JigSaw
//
//  Created by Slim Wang on 15/3/11.
//  Copyright (c) 2015年 LITB. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface JSHttpRequest : NSObject

/**
 *  Base Uri.
 *  Eg. http://127.0.0.1:8080
 */
- (NSString *)baseServerUrl;

/**
 *  Sub Uri.
 *  Eg. /secuty/login
 */
- (NSString *)subUri;

/**
 *  Http request headers
 */
- (NSMutableDictionary *)requestHeaders;

/**
 *  Convert to http request url
 */
- (NSString *)url;

/**
 *  Convert to http request body parameters
 */
- (NSDictionary *)toParameters;

/**
 *  Translate to dictionary.
 */
- (NSDictionary *)toDictionary;

- (id)onResponse:(id)response;

@end
